const mongoose = require('mongoose');
var mongoosePaginate = require('mongoose-paginate');
var schema           = new mongoose.Schema({
    title      : String,   //标题
    content    : String,   //内容
    img        : String,   //新闻图片
    author     : String,   //作者
    source     : String,   //来源
    publishDate: String    //新闻日期
});
schema.plugin(mongoosePaginate);
module.exports = mongoose.model('News', schema, 'news');